using System;
using System.Collections.Generic;
using MirrorMirror.Tests.Support;
using NUnit.Framework;

namespace MirrorMirror.Tests
{
    [TestFixture]
    public class TypeExtensionsTests
    {
        [Test]
        public void ShouldDescribeNonGenericTypes()
        {
            typeof(Int32).Description().Should(Be.EqualTo("System.Int32"));
        }
        [Test]
        public void ShouldDescribeGenericTypes()
        {
            typeof(IEnumerable<Int32>).Description().Should(Be.EqualTo("System.Collections.Generic.IEnumerable<System.Int32>"));
        }

        [Test]
        public void ShouldDescribeGenericTypesWithSeveralTypeParameters()
        {
            typeof(IDictionary<String,Int32>).Description().Should(Be.EqualTo("System.Collections.Generic.IDictionary<System.String,System.Int32>"));
        }

        [Test]
        public void ShouldDescribeNestedGenericTypes()
        {
            typeof(IDictionary<String, IEnumerable<Int32>>).Description().Should(Be.EqualTo("System.Collections.Generic.IDictionary<System.String,System.Collections.Generic.IEnumerable<System.Int32>>"));
        }
    }
}